#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QImage>
#include "function.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void getContent(int decide, int page);
    void putMirror(int decide);
//    void mousePressEvent(QMouseEvent *e);    //鼠标按下事件
//    void mouseMoveEvent(QMouseEvent *e);     //鼠标移动事件
//    void mouseReleaseEvent(QMouseEvent *e);  //鼠标释放事件

    int globalMark;//保存标记用（记录是否打开有图片）
    QImage globalImage;//存储图片用（保存打开的图片）
    Function proImage; //修改图片用
    bool isDrawing;
    QPoint begin,end;
    QPoint end_pos;    //鼠标释放时的位置
    QString Text;      //存储文字变量

private slots:
    void on_action_open_triggered();

    void on_action_save_triggered();

    void on_action_back_triggered();

    void on_action_revolve_triggered();

    void on_action_expand_triggered();

    void on_action_close_triggered();

    void on_action_shrink_triggered();

    void on_action_average_triggered();

    void on_action_mid_triggered();

    void on_action_square_triggered();

    void on_action_gaosi_triggered();

    void on_action_text_triggered();

    void on_pushButton_delete_4_clicked();

    void on_pushButton_confirm_4_clicked();

    void on_pushButton_delete_5_clicked();

    void on_pushButton_confirm_5_clicked();

    void on_pushButton_delete_3_clicked();

    void on_pushButton_confirm_3_clicked();

    void on_pushButton_delete_2_clicked();

    void on_pushButton_confirm_2_clicked();

    void on_action_mirror_triggered();

    void on_pushButton_cz_clicked();

    void on_pushButton_sp_clicked();

    void on_action_straw_triggered();

    void on_action_scissors_triggered();

    void on_pushButton_confirm_7_clicked();

private:
    Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
